# 2021.3.15 目前使用12版本，稳定
FROM node:12 

# Create app directory
WORKDIR /usr/src/app/server

# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY ../server .

RUN npm install 


RUN npm run build 


EXPOSE 3002

CMD [ "node", "dist/index.js" ]

USER node
